Skip to content

chore(ios): P2 polish - strip headers, cleanup orphan UserDefaults, accessibility labels#1168

Merged
datlechin merged 1 commit into
mainfrom
refactor/p2-polish
May 9, 2026
Merged

chore(ios): P2 polish - strip headers, cleanup orphan UserDefaults, accessibility labels#1168
datlechin merged 1 commit into
mainfrom
refactor/p2-polish

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

P2 polish pass bundling three independent items into one PR. Each item is small enough on its own that splitting into three PRs adds review overhead without payoff.

P2 #10 - Strip Xcode-generated file headers

Drop the 4-line //\n// X.swift\n// TableProMobile\n//\n boilerplate from every iOS source file. CLAUDE.md rule: no comments. Six files (drivers + SSH) had an extra one-liner description after the header; those descriptions are stripped too since the type names are self-explanatory and any non-obvious purpose belongs in a /// doc comment on the type, not as a floating top-of-file note.

Touched 58 files in TableProMobile/ and 9 in TableProWidget/.

P2 #9 - Cleanup orphan UserDefaults on connection delete

AppState.removeConnection now also calls clearPerConnectionPreferences(for:) which removes:

  • lastTab.<uuid> (selected tab on Connected screen)
  • lastDB.<uuid> (active database)
  • lastSchema.<uuid> (active schema)
  • lastQuery.<uuid> (last typed query in the editor)

Previously, deleting a connection silently leaked these four UserDefaults keys forever. Repeated add and delete cycles built up unbounded keychain-adjacent state.

P2 #8 - Accessibility labels on high-impact surfaces

Audit found 9 accessibility annotations across the entire app and zero hints. This pass adds the most-used surfaces:

  • TableRow (table list): combines type, name, and row count into a single accessibility element with hint "Opens table data"
  • ConnectionRow (connection list): combines type, display name, host or SQLite filename, and tag name into a single element with hint "Opens this connection"
  • ConnectionList toolbar: Add Connection, Sync with iCloud, and Settings icon-only buttons gain explicit accessibilityLabel

Other toolbar items (Sort, Filter, Insert Row in DataBrowser; Edit Connection in ConnectedView) already had labels.

Test plan

  • Header strip: app builds, no broken import statements (the strip is mechanical, but verify the diff in a couple of driver files)
  • Add a connection, delete it, then defaults read the app's bundle ID: the four last*.<uuid> keys for that connection are gone
  • VoiceOver on: navigate the connection list, hear "MySQL, Local, 127.0.0.1 port 3306. Opens this connection." Same shape for tables.
  • VoiceOver on toolbar: hear "Add Connection. Button.", "Sync with iCloud. Button.", "Settings. Button."

@datlechin datlechin merged commit bfd2320 into main May 9, 2026
2 checks passed
@datlechin datlechin deleted the refactor/p2-polish branch May 9, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant